package com.kifas.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "tb_master_gudang")
public class GudangEntity implements Serializable {

	private static final long serialVersionUID = 6446840367145309379L;

	@Id
	@GeneratedValue
	@Column(name = "id_master_gudang")
	private Long idGudang;

	@Column(name = "nama_gudang")
	private String namaGudang;

	private String lokasi;

	private String kapasitas;

	private String petugas;

	private String alamat;

	private String notelp;

	@Temporal(TemporalType.TIMESTAMP)
	private Date tgl_jth_tempo;

	private String kode;

	@OneToMany(mappedBy = "gudang", targetEntity = StokOpnameEntity.class, fetch = FetchType.LAZY)
	private Set<StokOpnameEntity> stokOpnames;

	@Column(name = "created_by")
	private String createdBy;

	public GudangEntity() {
	}

	public GudangEntity(Long idGudang, String namaGudang, String lokasi, String kapasitas, String petugas, String alamat, String kode, String notelp,
			Date tgl_jth_tempo, String createdBy) {
		this.idGudang = idGudang;
		this.namaGudang = namaGudang;
		this.lokasi = lokasi;
		this.kapasitas = kapasitas;
		this.petugas = petugas;
		this.alamat = alamat;
		this.kode = kode;
		this.notelp = notelp;
		this.tgl_jth_tempo = tgl_jth_tempo;
		this.createdBy = createdBy;
	}

	public GudangEntity(Long idGudang, String namaGudang, String lokasi, String kapasitas, String petugas, String alamat, String kode,
			Set<StokOpnameEntity> stokOpnames, String notelp, Date tgl_jth_tempo, String createdBy) {
		this.idGudang = idGudang;
		this.namaGudang = namaGudang;
		this.lokasi = lokasi;
		this.kapasitas = kapasitas;
		this.petugas = petugas;
		this.alamat = alamat;
		this.kode = kode;
		this.stokOpnames = stokOpnames;
		this.notelp = notelp;
		this.tgl_jth_tempo = tgl_jth_tempo;
		this.createdBy = createdBy;
	}

	public String getNotelp() {
		return notelp;
	}

	public void setNotelp(String notelp) {
		this.notelp = notelp;
	}

	public Date getTgl_jth_tempo() {
		return tgl_jth_tempo;
	}

	public void setTgl_jth_tempo(Date tgl_jth_tempo) {
		this.tgl_jth_tempo = tgl_jth_tempo;
	}

	public Long getIdGudang() {
		return idGudang;
	}

	public void setIdGudang(Long idGudang) {
		this.idGudang = idGudang;
	}

	public String getNamaGudang() {
		return namaGudang;
	}

	public void setNamaGudang(String namaGudang) {
		this.namaGudang = namaGudang;
	}

	public String getLokasi() {
		return lokasi;
	}

	public void setLokasi(String lokasi) {
		this.lokasi = lokasi;
	}

	public Set<StokOpnameEntity> getStokOpnames() {
		return stokOpnames;
	}

	public void setStokOpnames(Set<StokOpnameEntity> stokOpnames) {
		this.stokOpnames = stokOpnames;
	}

	public String getKapasitas() {
		return kapasitas;
	}

	public void setKapasitas(String kapasitas) {
		this.kapasitas = kapasitas;
	}

	public String getPetugas() {
		return petugas;
	}

	public void setPetugas(String petugas) {
		this.petugas = petugas;
	}

	public String getAlamat() {
		return alamat;
	}

	public void setAlamat(String alamat) {
		this.alamat = alamat;
	}

	public String getKode() {
		return kode;
	}

	public void setKode(String kode) {
		this.kode = kode;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getCreatedBy() {
		return createdBy;
	}

}